package com.huike.controller;

import com.huike.crmlog.dtos.LogPageDto;
import com.huike.log.Log;
import com.huike.result.Result;
import com.huike.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 系统日志
 */
@RestController
@RequestMapping("/api/crmlog")
public class LogController {

    @Autowired
    private LogService logService;

    /**
     * 分页查询
     * @param logPageDto
     * @return
     */
    @Log(title = "系统日志模块")
    @PostMapping("/list")
    public Result list(@RequestBody LogPageDto logPageDto){
        return logService.pageList(logPageDto);
    }
}
